package designMode.singletonPattern;

/**
 * @ClassName EagerlySingleton
 * @Description (饿汉式)急切创建单件,此方法不会发生多线程下多个实例的情况
 * @Author LIBOFEI
 * @Date 2020/6/24 21:02
 * @Version 1.0
 **/
public class EagerlySingleton {

    private static EagerlySingleton singleton = new EagerlySingleton();

    private EagerlySingleton(){

    }

    public static EagerlySingleton getInstance(){
        return singleton;
    }

}
